Skip to content

feat: add PuppetDB Query V4 APIs#11

Merged
zaben903 merged 5 commits intomainfrom
feature/puppet_db_query
Feb 20, 2026
Merged

feat: add PuppetDB Query V4 APIs#11
zaben903 merged 5 commits intomainfrom
feature/puppet_db_query

Conversation

@zaben903
Copy link
Collaborator

@zaben903 zaben903 commented Jan 12, 2026

Note: Yard-lint is currently failing due to handling of YARD macros. This will be resolved once mensfeld/yard-lint#65 is merged

@zaben903 zaben903 requested a review from Copilot January 12, 2026 02:38
@zaben903 zaben903 self-assigned this Jan 12, 2026
@zaben903 zaben903 added the enhancement New feature or request label Jan 12, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds comprehensive support for PuppetDB Query V4 APIs to the PE Client Ruby library. The implementation provides a complete interface for querying PuppetDB data including nodes, facts, catalogs, reports, resources, events, and more.

Changes:

  • Added main PuppetDB resource class with Query V4 API support
  • Implemented 15+ query endpoints covering nodes, facts, catalogs, reports, events, packages, and inventory
  • Added specialized sub-resources for nodes, factsets, catalogs, and reports with their own endpoint methods
  • Included comprehensive RSpec tests for all endpoints with required and optional parameter scenarios
  • Provided RBS type signatures for type checking

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
lib/pe_client/client.rb Adds puppet_db accessor method to client
lib/pe_client/resources/puppet_db.rb Main PuppetDB resource class with port configuration and query_v4 accessor
lib/pe_client/resources/puppet_db/query.v4.rb Core Query V4 implementation with 15+ endpoint methods
lib/pe_client/resources/puppet_db/query.v4/nodes.rb Node-specific endpoints for facts and resources
lib/pe_client/resources/puppet_db/query.v4/factsets.rb Factset query endpoints
lib/pe_client/resources/puppet_db/query.v4/catalogs.rb Catalog query endpoints with edges and resources
lib/pe_client/resources/puppet_db/query.v4/reports.rb Report query endpoints with events, metrics, and logs
sig/pe_client/resource/puppet_db.rbs Type signature for main PuppetDB resource
sig/pe_client/resource/puppet_db/query.v4.rbs Type signatures for Query V4 endpoints
sig/pe_client/resource/puppet_db/query.v4/nodes.rbs Type signatures for nodes sub-resource
sig/pe_client/resource/puppet_db/query.v4/factsets.rbs Type signatures for factsets sub-resource
sig/pe_client/resource/puppet_db/query.v4/catalogs.rbs Type signatures for catalogs sub-resource
sig/pe_client/resource/puppet_db/query.v4/reports.rbs Type signatures for reports sub-resource
spec/pe_client/resources/puppet_db_spec.rb Tests for main PuppetDB resource initialization and memoization
spec/pe_client/resources/puppet_db/query_v4_spec.rb Comprehensive tests for all Query V4 endpoints
spec/pe_client/resources/puppet_db/query_v4/nodes_spec.rb Tests for node-specific endpoints
spec/pe_client/resources/puppet_db/query_v4/factsets_spec.rb Tests for factset endpoints
spec/pe_client/resources/puppet_db/query_v4/catalogs_spec.rb Tests for catalog endpoints
spec/pe_client/resources/puppet_db/query_v4/reports_spec.rb Tests for report endpoints

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 8 comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 16 comments.

fixed `resource` URI generation
fixed working of `Nodes` class documentation
fixed missing RBS definition
fixed kwargs type definition
added missing URI construction tests
@zaben903 zaben903 force-pushed the feature/puppet_db_query branch from 212d7bb to 2b23079 Compare January 12, 2026 06:33
@zaben903 zaben903 merged commit 423bd72 into main Feb 20, 2026
10 checks passed
@zaben903 zaben903 deleted the feature/puppet_db_query branch February 20, 2026 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments